package com.eastjet.maintenance.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.eastjet.maintenance.domain.StorageLocation;
import com.ruoyi.common.datasource.annotation.Master;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 杨博文
 * @description 针对表【storage_location(存放位置)】的数据库操作Service
 * @createDate 2024-11-25 09:23:39
 */
@Service
public interface StorageLocationService extends IService<StorageLocation> {

    /**
     * 新增存放位置
     *
     * @param location
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    Boolean InsetStorageLocation(StorageLocation location);

    /**
     * 查询存放位置
     *
     * @return
     */
    List<StorageLocation> SelectLocation(String name);

    /**
     * 删除存放位置
     *
     * @param code
     * @return
     */
    Boolean DeleteLocation(String code);

    /**
     * 更新存放位置
     *
     * @param location
     * @return
     */
    Boolean UpdateLocation(List<StorageLocation> location);

    /**
     * 更新存放位置的状态
     *
     * @param code
     * @param status
     * @return
     */
    Boolean UpdateLocationQi(String code, String status);
}
